home *** CD-ROM | disk | FTP | other *** search
/ Aminet 37 / Aminet 37 (2000)(Schatztruhe)[!][Jun 2000].iso / Aminet / dev / lang / sofa.lha / sofa / smalleiffel / lib_show / basic_time / example5.e < prev   
Text File  |  2000-03-25  |  1KB  |  41 lines

  1. class EXAMPLE5
  2. --
  3. -- Using the TIME_IN_FRENCH class.
  4. --
  5.  
  6. creation make
  7.  
  8. feature {NONE}
  9.  
  10.    make is
  11.       local
  12.          basic_time: BASIC_TIME;
  13.          french: TIME_IN_FRENCH;
  14.          english: TIME_IN_ENGLISH;
  15.          italian: TIME_IN_ITALIAN;
  16.       do
  17.          basic_time.update;
  18.          french.set_basic_time(basic_time);
  19.          english.set_basic_time(basic_time);
  20.          italian.set_basic_time(basic_time);
  21.          io.put_string("The French format :%N");
  22.          show_time(french);
  23.          io.put_string("The English format :%N");
  24.          show_time(english);
  25.          io.put_string("The Italian format :%N");
  26.          show_time(italian);
  27.       end;
  28.    
  29.    show_time(format: TIME_IN_SOME_LANGUAGE) is
  30.       do
  31.          format.set_short_mode(false);
  32.          io.put_string("        ");
  33.          io.put_string(format.to_string);
  34.          io.put_string("%N        ");
  35.          format.set_short_mode(true);
  36.          io.put_string(format.to_string);
  37.          io.put_new_line;
  38.       end;
  39.    
  40. end
  41.